<template>
	<view class='booklist'>
		<view class="box" @click="goIntroduction(item)">
			<view class="box_img">
				<image :src="item.cover_vertical" mode="widthFix" lazy-load></image>
			</view>
			<view class="content">
				<view class="shang">
					<view class="shang_content">
						<image src="@/static/index/Frame.png" lazy-load></image> {{item.name}}
					</view>
				</view>
				<view class="zhong">
					<view class="zhong_content">
						{{item.description || item.intro}}
					</view>
				</view>
				<view class="xia">
					<view class="xia_left">
						<view class="tabs">
							<text class="tab" v-for="(el,index) in item.tags" :key="index">
								{{el}}
							</text>
						</view>
					</view>
				</view>
			</view>
			<view class="hot-img">
				<img src="@/static/index/breakthrough.png" >
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "BookList",
		props: {
			item: {
				type: Object,
				default: () => {}
			}
		},
		methods:{
			goIntroduction(item) {
				uni.navigateTo({
					url: `/pages/Introduction/Introduction?id=${item.id}`
				})
			}
		}
	}
</script>
<style lang="less" scope>
	.booklist {
		// background-color:#fff;
		// border-radius: 10rpx;
		.box {
			position: relative;
			width: 100%;
			border-radius: 16rpx;
			margin-top: 4rpx;
			display: flex;
			background-color:@context-primary;
			justify-content: space-around;
			align-items: center;
			overflow: hidden;
			padding: 16rpx 0;
			.hot-img{
				position: absolute;
				right: -10rpx;
				bottom: 0rpx;
				width: 176rpx;
				height: 140rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.box_img {
				width: 174rpx;
				height: 222rpx;
				line-height: 258rpx;

				image {
					display: block;
					width: 100%;
					height: 100%;
					border-radius: 16rpx;
				}
			}

			.content {
				width: 66%;
				height: 236rpx;
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;

				.shang {
					width: 100%;
					margin-top: 10rpx;

					.shang_content {
						font-weight: bold;
						font-size: 32rpx;
						color: #333333;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 1;
						image{
							vertical-align: middle;
							width: 54rpx;
							height: 54rpx;
							margin-right: 8rpx;
						}

					}
				}

				.zhong {
					width: 100%;


					.zhong_content {
						font-size: 24rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 3;
						color: #717171;
						line-height: 40rpx;
						margin-top:-10rpx;
					}
				}

				.xia {
					width: 100%;
					font-weight: 400;
					font-size: 24rpx;
					color: #BDBDBD;
					display: flex;
					justify-content: space-between;
					.xia_left {
						width: 100%;
						font-size: 24rpx;
						color: #666666;

						.tabs {
							width: 100%;

							.tab {
								height: 34rpx;
								text-align: center;
								font-size: 24rpx;
								line-height: 28rpx;
								margin-right: 16rpx;
								color: #fff;
							}

							.tab:nth-child(odd) {
								color: #FF8E12;
							}

							.tab:nth-child(even) {
								color: @color-hover;
							}

						}
					}

				}
			}
		}
	}
</style>